/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package chapter6;

import java.util.Scanner;

/**
 *
 * @author Denise Carolina
 */
public class SelfTest15 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        String input = "1 2 a 3 45 6";
        Scanner scan = new Scanner(input);
        int x = 0;
        do{

//            if(scan.hasNextInt()){
//                x = scan.nextInt();
//
//            }else{
//                x = 0;
//            }
//            x = scan.nextInt();
//            System.out.println("x:: " + x);
        }while(x != 0);

        scan = new Scanner(input);
        while(scan.hasNext()){
            if(scan.hasNextInt()){
                System.out.println("value:: " + scan.nextInt());
            }else{
                scan.next();
            }
            
        }
    }

}
